package com.gopay.common.domain.cps;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 分账明细信息表
 */
@Entity
@Table(name = "CPS_RECEIPT_SPLIT_DTL")
public class CpsReceiptSplitDtl extends BaseEntity {

    private int splitId;

    private int transDtlSq;

    private String mainGopayOrderId;

    private String merId;

    private String gopayIntTxnCd;

    private String splitAcct;

    private BigDecimal merTxnAmt;

    private BigDecimal refundAmt;

    private BigDecimal balAmt;

    private Date createdTs;

    private Date lastUpdTs;

    private int version;

    private String isPlatform;

    private String remark;

    @Id
    @SequenceGenerator(name = "CPS_RECEIPT_SPLIT_DTL_SEQ_GENERATOR", sequenceName = "CPS_RECEIPT_SPLIT_DTL_SEQ", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CPS_RECEIPT_SPLIT_DTL_SEQ_GENERATOR")
    @Column(name = "SPLIT_ID", unique = true, nullable = false, length = 30)
    public int getSplitId() {
        return splitId;
    }

    public void setSplitId(int splitId) {
        this.splitId = splitId;
    }

    @Column(name = "TRANS_DTL_SQ",  nullable = false)
    public int getTransDtlSq() {
        return transDtlSq;
    }

    public void setTransDtlSq(int transDtlSq) {
        this.transDtlSq = transDtlSq;
    }

    @Column(name = "MAIN_GOPAY_ORDER_ID", nullable = false, length = 30)
    public String getMainGopayOrderId() {
        return mainGopayOrderId;
    }

    public void setMainGopayOrderId(String mainGopayOrderId) {
        this.mainGopayOrderId = mainGopayOrderId;
    }

    @Column(name = "MER_ID", nullable = false, length = 10)
    public String getMerId() {
        return merId;
    }

    public void setMerId(String merId) {
        this.merId = merId;
    }

    @Column(name = "GOPAY_INT_TXN_CD", nullable = false, length = 6)
    public String getGopayIntTxnCd() {
        return gopayIntTxnCd;
    }

    public void setGopayIntTxnCd(String gopayIntTxnCd) {
        this.gopayIntTxnCd = gopayIntTxnCd;
    }

    @Column(name = "SPLIT_ACCT", nullable = false, length = 19)
    public String getSplitAcct() {
        return splitAcct;
    }

    public void setSplitAcct(String splitAcct) {
        this.splitAcct = splitAcct;
    }

    @Column(name = "MER_TXN_AMT", nullable = false, precision = 20)
    public BigDecimal getMerTxnAmt() {
        return merTxnAmt;
    }

    public void setMerTxnAmt(BigDecimal merTxnAmt) {
        this.merTxnAmt = merTxnAmt;
    }

    @Column(name = "REFUND_AMT", nullable = false,precision = 20)
    public BigDecimal getRefundAmt() {
        return refundAmt;
    }

    public void setRefundAmt(BigDecimal refundAmt) {
        this.refundAmt = refundAmt;
    }

    @Column(name = "BAL_AMT", nullable = false,precision = 20)
    public BigDecimal getBalAmt() {
        return balAmt;
    }

    public void setBalAmt(BigDecimal balAmt) {
        this.balAmt = balAmt;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS" )
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Version
    @Column(name = "VERSION",  precision = 22, scale = 0)
    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Column(name = "IS_PLATFORM",  length = 1)
    public String getIsPlatform() {
        return isPlatform;
    }

    public void setIsPlatform(String isPlatform) {
        this.isPlatform = isPlatform;
    }

    @Column(name = "REMARK",  length = 500)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

	@Override
	public String toString() {
		return "CpsReceiptSplitDtl [splitId=" + splitId + ", transDtlSq=" + transDtlSq + ", mainGopayOrderId="
				+ mainGopayOrderId + ", merId=" + merId + ", gopayIntTxnCd=" + gopayIntTxnCd + ", splitAcct="
				+ splitAcct + ", merTxnAmt=" + merTxnAmt + ", refundAmt=" + refundAmt + ", balAmt=" + balAmt
				+ ", createdTs=" + createdTs + ", lastUpdTs=" + lastUpdTs + ", version=" + version + ", isPlatform="
				+ isPlatform + ", remark=" + remark + "]";
	}
    
    
}
